﻿CREATE PROCEDURE [dbo].[spMonitorPrunePerfmon]
(
	@detail_months	int		= 1,
	@hourly_months	int		= 3
)
AS

SET NOCOUNT ON

DELETE FROM dbo.tblPerfmon WHERE date_inserted < DATEADD(month, (-1 * @detail_months), GETDATE())
DELETE FROM dbo.tblPerfmonHourlySummary WHERE date_inserted < DATEADD(month, (-1 * @hourly_months), GETDATE())

SET NOCOUNT OFF